package com.chen.entity.vo;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

/**
 * @author Y·C
 * @version 1.0.0
 * @ClassName UserPasswordDTO.java
 * @Description TODO
 * @createTime 2023年04月19日 20:35:00
 */
@Data
public class UserPasswordDTO {

    private String username;



    @NotNull(message = "邮箱不能为空")
    @Pattern(message = "请输入正确邮箱", regexp = "[\\w!#$%&'*+/=?^_`{|}~-]+(?:\\.[\\w!#$%&'*+/=?^_`{|}~-]+)*@(?:[\\w](?:[\\w-]*[\\w])?\\.)+[\\w](?:[\\w-]*[\\w])?")
    @ApiModelProperty("邮箱")
    private String email;

    @Size(message = "请输入6位验证码", max = 6, min = 6)
    @ApiModelProperty(value = "验证码")
    private String code;

    private String password;
    private String newPassword;
}
